<div class="gray_box" style="margin:15px 15px ;">
  <form action="<?php echo $_SERVER['PHP_SELF'];?>?task=save" method="POST">
    <input type="hidden" name="member_id" value="<?php echo $page_data[member_id];?>" />
    <?php if (!$page_data[admin]) { ?>
      <input type="hidden" name="permission_id" value="<?php echo $page_data[mem][permission_id];?>" />
    <?php } // end if not admin ?>
    <input type="hidden" name="address_id" value="<?php echo $page_data[address_id];?>" />
    <input type="hidden" name="phone_id[]" value="<?php echo $page_data[phone][phone_id];?>" />
    <input type="hidden" name="entry_id[]" value="<?php echo $page_data[mem_comp][entry_id];?>" />
    <input type="hidden" name="company_id[]" value="<?php echo $page_data[mem_comp][company_id];?>" />
    <input type="hidden" name="department_id[]" value="<?php echo $page_data[mem_comp][department_id];?>" />
    <table width="90%" cellspacing="2" cellpadding="4" align="center">
      <tr>
        <th colspan="3" style="border: 1px solid #000000;"><?php echo $lang['Reg_header'];?></th>
      </tr>
      <tr>
        <td colspan="2"><?php echo $lang['Reg_instructions'];?></td>
      </tr>
    <?php if (count($page_data[errors]) > 0) { ?>
      <tr>
        <td align="center" colspan="3" style="color: #ff0000">
          <?php echo implode('<br />', $page_data[errors]);?>
        </td>
      </tr>
    <?php } // end if errors ?>
      <tr>
        <td colspan="2">&nbsp;</td>
        <td><span class="required_field"><?php echo $lang['Required_field'];?></span></td>
      </tr>
      <tr>
        <td align="right" width="40%"><?php echo $lang['Reg_email'];?></td>
        <td align="left" width="35%">
          <input type="text" name="member_email" value="<?php echo $page_data[mem][member_email];?>" size="25" maxlength="255" >
        </td>
        <td><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_email_confirm'];?></td>
        <td align="left">
          <input type="text" name="member_email_confirm" value="<?php echo $page_data[mem][member_email_confirm];?>" size="25" maxlength="255">
        </td>
        <td><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Password_form'];?></td>
        <td align="left">
          <input type="password" name="member_password" value="<?php echo $page_data[mem][member_password];?>" size="25" maxlength="25">
        </td>
        <td><span class="required_field">* <?php echo $lang['Reg_password_detail'];?></span></td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_password_confirm'];?></td>
        <td align="left">
          <input type="password" name="member_password_confirm" value="<?php echo $page_data[mem][member_password_confirm];?>" size="25" maxlength="25">
        </td>
        <td><span class="required_field">* <?php echo $lang['Reg_password_detail'];?></span></td>
      </tr>
      <!--tr>
        <td align="right"><?php echo $lang['Reg_prefix'];?></td>
        <td align="left">
          <?php echo menu::menu_from_array('member_prefix', $page_data[prefixes], $page_data[mem][member_prefix]);?>
        </td>
      </tr-->
      <tr>
        <td align="right"><?php echo $lang['Reg_firstname'];?></td>
        <td align="left">
          <input type="text" name="member_firstname" value="<?php echo $page_data[mem][member_firstname];?>" size="25" maxlength="50">
        </td>
        <td><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_initial'];?></td>
        <td align="left">
          <input type="text" name="member_initial" value="<?php echo $page_data[mem][member_initial];?>" size="1" maxlength="1">
        </td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_lastname'];?></td>
        <td align="left">
          <input type="text" name="member_lastname" value="<?php echo $page_data[mem][member_lastname];?>" size="25" maxlength="50">
        </td>
        <td><span class="required_field">*</span></td>
      </tr>
      <!--tr>
        <td align="right"><?php echo $lang['Reg_suffix'];?></td>
        <td align="left">
          <?php echo menu::menu_from_array('member_suffix', $page_data[suffixes], $page_data[mem][member_suffix]);?>
        </td>
        <td>&nbsp;</td>
      </tr-->
      <tr>
        <td align="right"><?php echo $lang['Reg_credentials'];?></td>
        <td align="left">
          <input type="text" name="member_credentials" value="<?php echo $page_data[mem][member_credentials];?>" size="25" maxlength="100">
        </td>
        <td><span class="required_field">*</span></td>
      </tr>
      <!--tr>
        <td align="right" valign="top"><?php echo $lang['Reg_biography'];?></td>
        <td align="left">
          <?php echo $lang['Reg_biography_detail'];?><Br />
        </td>
        <td><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>
          <textarea name="member_biography" rows="7" cols="60"><?php echo $page_data[mem][member_biography];?></textarea>
        </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_position'];?></td>
        <td>
          <input type="text" name="member_position[]" value="<?php echo $page_data[mem_comp][member_position];?>" size="25" maxlength="255" />
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr-->

      <tr>
        <td align="right"><?php echo $lang['Reg_company'];?></td>
        <td>
          <input type="text" name="company_name[]" value="<?php echo $page_data[mem_comp][company_name];?>" size="25" maxlength="255" />
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
     <tr>
        <td align="right"><?php echo $lang['Reg_department'];?></td>
        <td>
          <input type="text" name="department_name[]" value="<?php echo $page_data[mem_comp][department_name];?>" size="25" maxlength="255" />
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_address'];?></td>
        <td>
          <input type="hidden" name="address_type_id" value="2" />
          <input type="hidden" name="address_primary_contact" value="1" />
          <input type="text" name="address_line1" value="<?php echo $page_data[address][address_line1];?>" size="25" maxlength="255" />
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_address2'];?></td>
        <td>
          <input type="text" name="address_line2" value="<?php echo $page_data[address][address_line2];?>" size="25" maxlength="255" />
        </td>
        <td valign="top"></td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_city'];?></td>
        <td>
          <input type="text" name="address_city" value="<?php echo $page_data[address][address_city];?>" size="25" maxlength="255" />
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right">
          <?php echo $lang['Reg_state'];?><br />
          <small><?php echo $lang['Reg_state_detail'];?></small>
        </td>
        <td>
          <input type="text" name="address_state" value="<?php echo $page_data[address][address_state];?>" size="25" maxlength="255" />
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right">
          <?php echo $lang['Reg_zip'];?><br />
          <small><?php echo $lang['Reg_zip_detail'];?></small>
        </td>
        <td>
          <input type="text" name="address_zip" value="<?php echo $page_data[address][address_zip];?>" size="5" maxlength="10" />
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right">
          <?php echo $lang['Reg_country'];?><br />
          <small><?php echo $lang['Reg_country_detail'];?></small>
        </td>
        <td>
          <input type="text" name="address_country" value="<?php echo $page_data[address][address_country];?>" size="25" maxlength="255" />
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_phone'];?><br />
          <small><?php echo $lang['Reg_phone_example'];?></small></td>
        <td>
          <input type="text" name="phone_number[]" value="<?php echo $page_data[phone][phone_number];?>" size="18" maxlength="18" />
          <input type="hidden" name="phone_type_id[]" value="2" />
          <input type="hidden" name="phone_primary_contact[]" value="1" />          
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td align="right"><?php echo $lang['Reg_fax'];?><br />
          <small><?php echo $lang['Reg_fax_example'];?></small></td>
        <td>
          <input type="text" name="phone_number[]" value="<?php echo $page_data[fax][phone_number];?>" size="18" maxlength="18" />
          <input type="hidden" name="phone_type_id[]" value="4" />
          <input type="hidden" name="phone_primary_contact[]" value="0" />          
        </td>
        <td valign="top"></td>
      </tr>
      <!--tr>
        <td colspan="3">&nbsp;</td>
      </tr>
      <tr>
        <td class="reg_page" colspan="2">
          <?php echo $lang['Reg_student_question'];?>
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>
          <input type="radio" name="member_student" value="1" <?php if ($page_data[mem][member_student]) { echo "CHECKED"; } ?> /> Yes
          <input type="radio" name="member_student" value="0" <?php if ($page_data[mem][member_student] != '' && !$page_data[mem][member_student]) { echo "CHECKED"; } ?> /> No
        </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td class="reg_page" colspan="2">
          <?php echo $lang['Reg_post_doctoral_question'];?>
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>
          <input type="radio" name="member_postdoctoral" value="1" <?php if ($page_data[mem][member_postdoctoral]) { echo "CHECKED"; } ?> /> Yes
          <input type="radio" name="member_postdoctoral" value="0" <?php if ($page_data[mem][member_postdoctoral] != '' && !$page_data[mem][member_postdoctoral]) { echo "CHECKED"; } ?> /> No
        </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td class="reg_page" colspan="2">
          <?php echo $lang['Reg_terminal_degree_question'];?>
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>
          <input type="radio" name="member_terminal_degree" value="1" <?php if ($page_data[mem][member_terminal_degree]) { echo "CHECKED"; } ?> /> Yes
          <input type="radio" name="member_terminal_degree" value="0" <?php if ($page_data[mem][member_terminal_degree] != '' && !$page_data[mem][member_terminal_degree]) { echo "CHECKED"; } ?> /> No
        </td>
        <td>&nbsp;</td>
      </tr-->
      <tr>
        <td class="reg_page" >
          <?php echo $lang['Reg_client_mem_question'];?>
        </td>
        <td>
          <input type="radio" name="member_aps_mem" value="1" <?php if ($page_data[mem][member_aps_mem]) { echo "CHECKED"; } ?> /> Yes
          <input type="radio" name="member_aps_mem" value="0" <?php if ($page_data[mem][member_aps_mem] != '' && !$page_data[mem][member_aps_mem]) { echo "CHECKED"; } ?> /> No
        </td>
        <td valign="top"><span class="required_field">*</span></td>
      </tr>     
      <?php if ($page_data[admin]) {?>
      <tr>
        <td class="reg_page" >
          <?php echo $lang['Reg_program_committee_question'];?>
        </td>
        <td>
          <input type="checkbox" name="member_program_committee" value="1" <?php if ($page_data[mem][member_program_committee]) { echo "CHECKED"; } ?> /> Yes
        </td>
        <td valign="top"></td>
      </tr> 
        <tr>
          <td align="right">
            User Permissions:
          </td>
          <td>
            <?php echo menu::menu_from_assoc_array('permission_id', $page_data[permission_types], $page_data[mem][permission_id]); ?>
          </td>
        </tr>
      <?php } //end if admin page ?>
      <tr>
        <td colspan="3"><p><?php echo $lang['Reg_final_instructions'];?></p></td>
      </tr>
      <tr>
        <td align="center" colspan="3">
          <input type="submit" name="sumbit" value="<?php echo $lang['Register'];?>">&nbsp;&nbsp;
          <input type="reset" name="reset" value="<?php echo $lang['Reset'];?>">&nbsp;&nbsp;
          <input type="button" value="<?php echo $lang['Cancel'];?>" onclick="window.location='<?php echo $page_data[cancel_link];?>';">&nbsp;&nbsp;
        </td>
      </tr>
    </table>
  </form>
</div>